<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>String对象</title>
</head>
<body>
<script>
//创建字符串对象
    var str = new String("Here are some string!");

    //使用对象属性和方法
    console.log(str.length);
    console.log(str.indexOf("some"));
    console.log(str.substr(5,15));


//创建数组对象
    var movies = new Array("007", "指环王");

    //使用对象属性和方法
    console.log(movies.length);
    console.log(movies.push("憨豆先生"));
    console.log(movies.pop());
</script>
</body>
</html>